﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="keywords" content="万州特色农产品网" />
<meta name="description" content="万州特色农产品网" />
<link href="__PUBLIC__/css/base.css" type="text/css" rel="stylesheet" />
<link href="__PUBLIC__/css/main.css" type="text/css" rel="stylesheet" />
<title>万州特色农产品网</title>
</head>

<body>
<include file="./Tpl/default/Index/header.html" />
<script type="text/javascript" src="__PUBLIC__/js/validation/easy_validator.pack.js"></script>
<script type="text/javascript" src="__PUBLIC__/js/validation/jquery.bgiframe.min.js"></script>
<link href="__PUBLIC__/css/validation/validate.css" rel="stylesheet" type="text/css" />
<script language="JavaScript">
	function updateUserInfo(){

		if( $('#pwd_two').val()!='' || $('#pwd_two').val().length!=0){
			if ( ($('#pwd_three').val()) != ($('#pwd_two').val()) ){
				alert('两次密码输入不一致，请重新输入');				
				$('#pwd_two').val('');
				$('#pwd_three').val('');
				$('#pwd_two').focus();
				return false ;
			}
		}

		var pwd ;
		if( $('#pwd_two').val().length == 0){			
			pwd = "{$userVo['pwd']}" ;
		}else{			
			pwd = $('#pwd_two').val() ;
		}
		if(confirm('确认修改？')){
			
			$.post('__URL__/userInfomationUpdate',
		    	    {
			    	    'id':"{$userVo['id']}",	    	    
			    	    'pwd': pwd,
			    	    'realname':$('#realname').val(),
			    	    'email':$('#email').val(),
			    	    'mobile':$('#mobile').val(),
			    	    'address':$('#address').val()			    	    
			    	},
					    function(data){
							alert(data.info);	
					    },
				    'json');		
		}
		return false ;
	}
</script>


<div class="w980 clear mT10">
  <div class="content-left fRight line18 w768">
  
  <form action="__URL__/userInfomationUpdate" id="userForm">  
    <div class=" clear p10">
    <p class="font18 fontYH mB20 line24 lineB pTB10">个人资料管理</p>
<p class="orange font14 fontbold border-d-b  w90auto p10">账户信息</p>

  <table border="0" cellspacing="0" cellpadding="0" class="w90auto mTB10">
  <tr>
    <td align="right" class="p5" width="200">会员名：</td>
    <td class="p5"><label>{$userVo['name']}</label> <!-- <input type="text" readonly="readonly" value = "{$userVo['name']}" style="width:200px; height:20px;" id="name" url="__URL__/uservalidate" /> --></td>
  </tr>
  <!-- 
  <tr>
    <td align="right" class="p5">原始密码：</td>
    <td class="p5"><input type="password" id="pwd_one" reg="[^0]" tip="原始密码不能为空！" value = "{$userVo['pwd']}" style="width:200px; height:20px;"/></td>
  </tr>
   -->

  <tr>
    <td align="right" class="p5"> 新密码：</td>
    <td class="p5"><input type="password" id="pwd_two" style="width:200px; height:20px;"/></td>
  </tr>
  <tr>
    <td align="right" class="p5"> 请再输入一次新密码：</td>
    <td class="p5"><input type="password" id="pwd_three" style="width:200px; height:20px;"/></td>
  </tr>

</table>
<p class="orange font14 fontbold border-d-b  w90auto p10">联系方式</p>
  <table border="0" cellspacing="0" cellpadding="0" class="w90auto mTB10">
  <tr>
    <td width="200" align="right" class="p5">真实姓名：</td>
    <td class="p5"><input type="text" id="realname" reg="[^0]" tip="真实姓名不能为空！" style="width:200px; height:20px;" id="realname" value = "{$userVo['realname']}"/></td>
  </tr>
  <tr>
    <td align="right" class="p5">电子邮箱：</td>
    <td class="p5"><input type="text" id="email"   reg="^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$" tip="请输入正确的邮箱地址，如123@sina.com" style="width:200px; height:20px;"  value = "{$userVo['email']}"/></td>
  </tr>
  <tr>
    <td align="right" class="p5">联系电话：</td>
    <td class="p5"><input type="text" id="mobile" reg="(\d{11})|^((\d{7,8})|(\d{4}|\d{3})-(\d{7,8})|(\d{4}|\d{3})-(\d{7,8})-(\d{4}|\d{3}|\d{2}|\d{1})|(\d{7,8})-(\d{4}|\d{3}|\d{2}|\d{1}))$" tip="请输入正确的联系电话！如：手机号 13888888888，区号：02388888888" style="width:200px; height:20px;"  value = "{$userVo['mobile']}"/></td>    
  </tr>
  <tr>
    <td align="right" class="p5">收货地址：</td>
    <td class="p5"><input type="text" id="address" reg="[^0]" tip="收货地址不能为空！" style="width:200px; height:20px;" value = "{$userVo['address']}"/></td>
  </tr>
  

  
   <tr>
    <td height="40" align="right" class="p5"></td>
    <td class="p5 font14"><input type="button" onclick="updateUserInfo();" class="p5 bgOrange white" style="cursor:pointer;" value="确认修改"></td>
  </tr>
</table>
  
  </form>
  
 
    
    </div>
    
  
    
    
  
</div>
<include file="./Tpl/default/UserCenter/left.html" />

  
</div>

<include file="./Tpl/default/Index/footer.html" />
</body>
</html>
